package com.szrt.day20170411.ch05;

import org.junit.Test;

public class CarTest {
	
	@Test
	public void test() throws Exception {
		
		Car car1 = new Car("红色",250000.00);
		Car car2 = new Car("红色",250000.00);
		
		System.err.println("car1="+car1);
		System.err.println("car2="+car2);
		System.err.println(car1 == car2);
		
		
		System.err.println("======================================");
		car2=car1;
		System.err.println("car1="+car1);
		System.err.println("car2="+car2);
		System.err.println(car1==car2);
		
	}
	
	@Test
	public void test02() throws Exception {
		
		Car car1 = new Car("红色",250000.00);
		Car car2 = new Car("红色",250000.00);
		
		car1.add(10, 20);
		car2.add(10, 20);
		
	}

}
